package com.gin.no_gay_alliance.database.migration;

import androidx.annotation.NonNull;
import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;

/**
 * @author : ginstone
 * @version : v1.0.0
 * @since : 2023/8/11 15:30
 **/
public class Migration3_4 extends Migration {
    public Migration3_4() {
        super(3, 4);
    }

    @Override
    public void migrate(@NonNull SupportSQLiteDatabase database) {
        database.execSQL("create table NgaEmoteCount (id INTEGER primary key not null,code TEXT not null,count INTEGER not null)");
        database.execSQL("CREATE UNIQUE INDEX IF NOT EXISTS code_unique ON NgaEmoteCount (code)");
    }
}
